<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 Copyright (C) 2014 - 2016 Open Source Geospatial Foundation. All rights reserved.
 This code is licensed under the GPL 2.0 license, available at the root
 application directory.
 -->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
    <bean class="org.geoserver.platform.ModuleStatusImpl">
      <constructor-arg index="0" value="gs-wfs"/>
      <constructor-arg index="1" value="GeoServer Web Feature Service"/>
    </bean>
	<bean id="wfsLegacyLoader" class="org.geoserver.wfs.WFSLoader"/>
	<bean id="wfsLoader" class="org.geoserver.wfs.WFSXStreamLoader">
	  <constructor-arg ref="resourceLoader"/>
	</bean>
    
	<!-- wfs service -->
	<!--bean id="wfsService" class="org.geoserver.wfs.DefaultWebFeatureService">
		<constructor-arg ref="geoServer"/>
		<property name="filterFactory" ref="filterFactory"/>
	</bean-->
	<bean id="wfsServiceTarget" class="org.geoserver.wfs.DefaultWebFeatureService">
		<constructor-arg ref="geoServer"/>
		<property name="filterFactory" ref="filterFactory"/>
	</bean>
    <bean id="wfsService20Target" class="org.geoserver.wfs.DefaultWebFeatureService20">
        <constructor-arg ref="geoServer"/>
        <property name="filterFactory" ref="filterFactory"/>
    </bean>

    <bean id="wfsLogger" class="org.geoserver.ows.util.EMFLogger">
      <constructor-arg type="java.lang.String" value="org.geoserver.wfs"/>
    </bean>
	<bean id="wfsService" class="org.springframework.aop.framework.ProxyFactoryBean">
	  <property name="proxyInterfaces">
	  	<value>org.geoserver.wfs.WebFeatureService</value>
	  </property>
	  <property name="interceptorNames">
	  	<list>
	  		<value>wfsLogger</value>
            <value>wfsServiceInterceptor*</value>
	  		<value>wfsServiceTarget</value>
	  	</list>
	  </property>
	</bean>

    <bean id="wfsService20" class="org.springframework.aop.framework.ProxyFactoryBean">
      <property name="proxyInterfaces">
        <value>org.geoserver.wfs.WebFeatureService20</value>
      </property>
      <property name="interceptorNames">
        <list>
            <value>wfsLogger</value>
            <value>wfsService20Target</value>
        </list>
      </property>
    </bean>

    <!-- 1.0 Transaction element handlers -->
  
    <bean id="wfsFactoryExtension" class="org.geoserver.wfs.WFSFactoryExtension"/>
    
    <!-- Transaction element handlers -->
    <bean id="wfsInsertElementHandler" class="org.geoserver.wfs.InsertElementHandler">
      <constructor-arg ref="geoServer"/>
      <constructor-arg ref="filterFactory"/>
    </bean>
    
    <bean id="wfsUpdateElementHandler" class="org.geoserver.wfs.UpdateElementHandler">
      <constructor-arg ref="geoServer"/>
    </bean>
    
    <bean id="wfsDeleteElementHandler" class="org.geoserver.wfs.DeleteElementHandler">
      <constructor-arg ref="geoServer"/>
    </bean>

    <bean id="wfsReplaceElementHandler" class="org.geoserver.wfs.ReplaceElementHandler">
      <constructor-arg ref="geoServer"/>
    </bean>
    
    <bean id="wfsNativeElementHandler" class="org.geoserver.wfs.NativeElementHandler">
    </bean>

	<!-- service descriptors -->
	<bean id="wfsService-1.0.0" class="org.geoserver.platform.Service">
		<constructor-arg index="0" value="wfs"/>
		<constructor-arg index="1" value="http://www.opengis.net/wfs"/>
		<constructor-arg index="2" ref="wfsService"/>
		<constructor-arg index="3" value="1.0.0"/>
		<constructor-arg index="4">
		  <list>
		    <value>GetCapabilities</value>
		    <value>DescribeFeatureType</value>
		    <value>GetFeature</value>
		    <value>GetFeatureWithLock</value>
		    <value>LockFeature</value>
		    <value>Transaction</value>
		  </list>
		</constructor-arg>
	</bean>
	
	<bean id="wfsService-1.1.0" class="org.geoserver.platform.Service">
		<constructor-arg index="0" value="wfs"/>
		<constructor-arg index="1" value="http://www.opengis.net/wfs"/>
		<constructor-arg index="2" ref="wfsService"/>
		<constructor-arg index="3" value="1.1.0"/>
		<constructor-arg index="4">
          <list>
            <value>GetCapabilities</value>
            <value>DescribeFeatureType</value>
            <value>GetGmlObject</value>
            <value>GetFeature</value>
            <value>GetFeatureWithLock</value>
            <value>LockFeature</value>
            <value>Transaction</value>
          </list>
        </constructor-arg>
	</bean>
	
    <bean id="wfsService-2.0" class="org.geoserver.platform.Service">
        <constructor-arg index="0" value="wfs"/>
        <constructor-arg index="1" value="http://www.opengis.net/wfs/2.0"/>
        <constructor-arg index="2" ref="wfsService20"/>
        <constructor-arg index="3" value="2.0.0"/>
        <constructor-arg index="4">
          <list>
            <value>GetCapabilities</value>
            <value>DescribeFeatureType</value>
            <value>GetFeature</value>
            <value>GetFeatureWithLock</value>
            <value>GetPropertyValue</value>
            <value>LockFeature</value>
            <value>Transaction</value>
            <value>ListStoredQueries</value>
            <value>DescribeStoredQueries</value>
            <value>CreateStoredQuery</value>
            <value>DropStoredQuery</value>
          </list>
        </constructor-arg>
    </bean>
	
	<!-- service exception handler -->
	<bean id="wfsExceptionHandler" class="org.geoserver.wfs.response.WfsExceptionHandler">
		<constructor-arg>
			<list>
				<ref bean="wfsService-1.0.0"/>
				<ref bean="wfsService-1.1.0"/>
			</list>		
		</constructor-arg>	
		<constructor-arg ref="geoServer"/>
	</bean>
  
    <!-- the schema cleaner -->
    <bean id="xsdSchemaCleaner" class="org.geoserver.wfs.xml.SchemaCleanerCallback"/>

    <bean id="wfs20ExceptionHandler" class="org.geoserver.wfs.response.Wfs2ExceptionHandler">
        <constructor-arg>
            <ref bean="wfsService-2.0"/>
        </constructor-arg>
        <constructor-arg ref="geoServer"/>
        <property name="useServiceVersion" value="true"/>
    </bean>
	
	<!-- gml schema builders -->
	<bean id="gml2SchemaBuilder" class="org.geoserver.wfs.xml.FeatureTypeSchemaBuilder$GML2">
		<constructor-arg ref="geoServer"/>
	</bean>
	<bean id="gml3SchemaBuilder" class="org.geoserver.wfs.xml.FeatureTypeSchemaBuilder$GML3">
		<constructor-arg ref="geoServer"/>
	</bean>
	
	<!-- xml configuration -->
	<bean id="wfsXsd-1.0" class="org.geoserver.wfs.xml.v1_0_0.WFS">
	    <constructor-arg ref="gml2SchemaBuilder"/>
	</bean>
	<bean id="xmlConfiguration-1.0" class="org.geoserver.wfs.xml.v1_0_0.WFSConfiguration" lazy-init="false">
		<constructor-arg ref="catalog"/>
		<constructor-arg ref="gml2SchemaBuilder"/>
		<constructor-arg ref="wfsXsd-1.0"/>
	</bean>
	<alias name="xmlConfiguration-1.0" alias="wfsXmlConfiguration-1.0"/>
	
	<bean id="wfsXsd-1.1" class="org.geoserver.wfs.xml.v1_1_0.WFS">
        <constructor-arg ref="gml3SchemaBuilder"/>
    </bean>
	<bean id="xmlConfiguration-1.1" class="org.geoserver.wfs.xml.v1_1_0.WFSConfiguration" lazy-init="false">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="gml3SchemaBuilder"/>
		<constructor-arg ref="wfsXsd-1.1"/>
	</bean>
	<alias name="xmlConfiguration-1.1" alias="wfsXmlConfiguration-1.1"/>
   
	<!-- responses -->
	<bean id="getCapabilitiesResponse"
		class="org.geoserver.wfs.response.GetCapabilitiesResponse" scope="prototype"/>
	<bean id="lockFeatureResponse"
		class="org.geoserver.wfs.response.LockFeatureTypeResponse" scope="prototype">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="xmlConfiguration-1.1"/>
	</bean>
	<bean id="lockFeatureResponse-2.0"
        class="org.geoserver.wfs.response.v2_0.LockFeatureTypeResponse" scope="prototype">
        <constructor-arg ref="geoServer"/>
    </bean>
	<bean id="transactionResponse-1.0.0"
		class="org.geoserver.wfs.response.TransactionResponse" scope="prototype">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="xmlConfiguration-1.1"/>
	</bean>
	<bean id="transactionResponse-2.0"
        class="org.geoserver.wfs.response.v2_0.TransactionResponse" scope="prototype">
        <constructor-arg ref="geoServer"/>
    </bean>
	
	<bean id="geometryResponse"
		class="org.geoserver.wfs.response.GeometryResponse">
        <constructor-arg ref="geoServer"/>
    </bean>
	<bean id="featureResponse"
		class="org.geoserver.wfs.response.FeatureResponse">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="xmlConfiguration-1.1"/>
	</bean>
	
	<bean id="listStoredQueriesResponse-2.0" 
       class="org.geoserver.wfs.response.v2_0.ListStoredQueriesResponse">
        <constructor-arg ref="geoServer"/>
    </bean>
    
    <bean id="describeStoredQueriesResponse-2.0" 
       class="org.geoserver.wfs.response.v2_0.DescribeStoredQueriesResponse">
        <constructor-arg ref="geoServer"/>
    </bean>
    
	<bean id="createStoredQueryResponse-2.0" 
	   class="org.geoserver.wfs.response.v2_0.CreateStoredQueryResponse">
	    <constructor-arg ref="geoServer"/>
	</bean>
	
	<bean id="dropStoredQueryResponse-2.0" 
       class="org.geoserver.wfs.response.v2_0.DropStoredQueryResponse">
        <constructor-arg ref="geoServer"/>
    </bean>
	
	<bean id="getPropertyValueResponse-2.0" 
       class="org.geoserver.wfs.response.v2_0.GetPropertyValueResponse">
        <constructor-arg ref="geoServer"/>
    </bean>

	<!-- cite compliance hack -->
	<bean id="wfsCiteComplianceHack" class="org.geoserver.ows.CiteComplianceHack">
		<constructor-arg ref="geoServer"/>
        <constructor-arg value="org.geoserver.wfs.WFSInfo"/>
	</bean>
	
	<!-- test servlet -->
	<bean id="wfsTestServlet" class="org.springframework.web.servlet.mvc.ServletWrappingController">
	  <property name="servletClass" value="org.vfny.geoserver.wfs.servlets.TestWfsPost"/>
	  <property name="servletName" value="TestWfsPost"/>
	</bean>
	
	<!-- http url mapping -->
	<bean id="wfsURLMapping"
        class="org.geoserver.ows.OWSHandlerMapping">
        <constructor-arg ref="catalog"/> 
		<property name="alwaysUseFullPath" value="true"/>
		<property name="interceptors">
			<list>
				<ref bean="wfsCiteComplianceHack"/>
			</list>
		</property>
	
		<property name="mappings">
			<props>
				<prop key="/wfs">dispatcher</prop>
				<prop key="/wfs/*">dispatcher</prop>
				<prop key="/TestWfsPost">wfsTestServlet</prop>
			</props>
		</property>
	</bean>
	
	
	<!-- kvp parsers -->
	<bean id="typeNameKvpParser" class="org.geoserver.wfs.kvp.TypeNameKvpParser">
    <constructor-arg value="typeName"/>
    <constructor-arg ref="geoServer"/>
    <constructor-arg ref="catalog"/>
	</bean>
  <bean id="typeNamesKvpParser" class="org.geoserver.wfs.kvp.TypeNamesKvpParser">
    <constructor-arg value="typeNames"/>
    <constructor-arg ref="geoServer"/>
  </bean>
  <bean id="aliasesKvpParser" class="org.geoserver.ows.NestedKvpParser">
    <constructor-arg value="aliases"/>
    <constructor-arg value="java.lang.String"/>
  </bean>
  <bean id="getFeatureNamespaceKvpParser" class="org.geoserver.ows.kvp.NamespaceKvpParser">
    <constructor-arg value="namespace"/>
    <property name="service"><value>WFS</value></property>
    <property name="version"><value>1.1.0</value></property>
    <property name="request"><value>GetFeature</value></property>
  </bean>
  <bean id="getFeature20NamespaceKvpParser" class="org.geoserver.ows.kvp.NamespaceKvpParser">
    <constructor-arg value="namespaces"/>
    <constructor-arg value="true"/>
    <property name="service"><value>WFS</value></property>
    <property name="version"><value>2.0.0</value></property>
    <property name="request"><value>GetFeature</value></property>
  </bean>
	<bean id="getPropertyValue20NamespaceKvpParser" class="org.geoserver.ows.kvp.NamespaceKvpParser">
		<constructor-arg value="namespaces"/>
		<constructor-arg value="true"/>
		<property name="service"><value>WFS</value></property>
		<property name="version"><value>2.0.0</value></property>
		<property name="request"><value>GetPropertyValue</value></property>
	</bean>
  <bean id="dftNamespaceKvpParser" class="org.geoserver.ows.kvp.NamespaceKvpParser">
    <constructor-arg value="namespace"/>
    <property name="service"><value>WFS</value></property>
    <property name="version"><value>1.1.0</value></property>
    <property name="request"><value>DescribeFeatureType</value></property>
  </bean>
  <bean id="dft20NamespaceKvpParser" class="org.geoserver.ows.kvp.NamespaceKvpParser">
    <constructor-arg value="namespaces"/>
    <constructor-arg value="true"/>
    <property name="service"><value>WFS</value></property>
    <property name="version"><value>2.0.0</value></property>
    <property name="request"><value>DescribeFeatureType</value></property>
  </bean>
	<bean id="lockFeatureNamespaceParser" class="org.geoserver.ows.kvp.NamespaceKvpParser">
		<constructor-arg value="namespace"/>
		<property name="service"><value>WFS</value></property>
		<property name="version"><value>1.1.0</value></property>
		<property name="request"><value>LockFeature</value></property>
	</bean>
	<bean id="lockFeature20NamespaceParser" class="org.geoserver.ows.kvp.NamespaceKvpParser">
		<constructor-arg value="namespaces"/>
		<constructor-arg value="true"/>
		<property name="service"><value>WFS</value></property>
		<property name="version"><value>2.0.0</value></property>
		<property name="request"><value>LockFeature</value></property>
	</bean>


	<bean id="featureIdKvpParser" class="org.geoserver.ows.FlatKvpParser">
		<constructor-arg index="0" value="featureId"/>
		<constructor-arg index="1" value="java.lang.String"/>
	</bean>
	<bean id="resourceIdKvpParser" class="org.geoserver.ows.FlatKvpParser">
        <constructor-arg index="0" value="resourceId"/>
        <constructor-arg index="1" value="java.lang.String"/>
    </bean>
	
	<bean id="bboxKvpParser" class="org.geoserver.wfs.kvp.BBoxKvpParser"/>
	<bean id="filter1_0_0_KvpParser" class="org.geoserver.wfs.kvp.Filter_1_0_0_KvpParser">
        <constructor-arg ref="geoServer"/>
		<property name="service"><value>WFS</value></property>
		<property name="version"><value>1.0.0</value></property>
	</bean>
	<bean id="filter1_1_0_KvpParser" class="org.geoserver.wfs.kvp.Filter_1_1_0_KvpParser">
        <constructor-arg ref="geoServer"/>
		<property name="service"><value>WFS</value></property>
		<property name="version"><value>1.1.0</value></property>
	</bean>
	<bean id="filter2_0_0_KvpParser" class="org.geoserver.wfs.kvp.Filter_2_0_0_KvpParser">
        <constructor-arg ref="geoServer"/>
        <property name="service"><value>WFS</value></property>
        <property name="version"><value>2.0.0</value></property>
    </bean>
	<!-- the filter kvp parser to use when the version and/or service parameters are not supplied
	     (they're mandatory, but we're lax, so without this default catch-all parser the dispatcher
	     may not find out the one to use) -->
	<bean id="filter1_1_0_KvpParserDefault" class="org.geoserver.wfs.kvp.Filter_1_1_0_KvpParser">
         <constructor-arg ref="geoServer"/>
    </bean>

    <bean id="cqlKvpParser" class="org.geoserver.ows.kvp.CQLFilterKvpParser"/>
	<bean id="propertyName10KvpParser" class="org.geoserver.ows.NestedKvpParser">
		<constructor-arg index="0" value="propertyName"/>
		<constructor-arg index="1" value="java.lang.String"/>
		<property name="version" value="1.0.0"/>
		<property name="service" value="wfs"/>
	</bean>
	<bean id="propertyName11KvpParser" class="org.geoserver.ows.NestedKvpParser">
        <constructor-arg index="0" value="propertyName"/>
        <constructor-arg index="1" value="java.lang.String"/>
        <property name="version" value="1.1.0"/>
        <property name="service" value="wfs"/>
    </bean>
	<bean id="maxFeatureKvpParser" class="org.geoserver.ows.util.NumericKvpParser">
		<constructor-arg index="0" value="maxFeatures"/>
		<constructor-arg index="1" value="java.math.BigInteger"/>
	</bean>
	<bean id="countKvpParser" class="org.geoserver.ows.util.NumericKvpParser">
        <constructor-arg index="0" value="count"/>
        <constructor-arg index="1" value="java.math.BigInteger"/>
    </bean>
	
	<bean id="srsNameKvpParser" class="org.geoserver.wfs.kvp.SrsNameKvpParser"/>
	<bean id="sortByKvpParser" class="org.geoserver.ows.kvp.SortByKvpParser">
		<constructor-arg ref="filterFactory"/>
	</bean>
	<bean id="expiryKvpParser" class="org.geoserver.ows.util.NumericKvpParser">
		<constructor-arg value="expiry"/>
		<constructor-arg value="java.math.BigInteger"/>
	</bean>
	<bean id="resultTypeKvpParser" class="org.geoserver.wfs.kvp.ResultTypeKvpParser"/>
	<bean id="acceptVersions11KvpParser" class="org.geoserver.wfs.kvp.AcceptVersionsKvpParser"/>
	<bean id="acceptVersionsKvpParser" class="org.geoserver.wfs.kvp.v2_0.AcceptVersionsKvpParser"/>
	<bean id="acceptFormats11KvpParser" class="org.geoserver.wfs.kvp.AcceptFormatsKvpParser"/>
	<bean id="acceptFormatsKvpParser" class="org.geoserver.wfs.kvp.v2_0.AcceptFormatsKvpParser"/>
    <bean id="strictKvpParser" class="org.geoserver.ows.kvp.BooleanKvpParser">
        <constructor-arg value="strict"/>
    </bean>
    <bean id="wfsFormatOptionsKvpParser" class="org.geoserver.ows.kvp.FormatOptionsKvpParser"/>
    <bean id="charsetKvpParser" class="org.geoserver.ows.kvp.CharsetKVPParser">
        <constructor-arg value="charset"/>
    </bean>
  <bean id="wfsSqlViewKvpParser" class="org.geoserver.ows.kvp.ViewParamsKvpParser">
    <property name="service" value="WFS"/>
  </bean>
  
  <bean id="resultType20KvpParser" class="org.geoserver.wfs.kvp.v2_0.ResultTypeKvpParser"/>
  <bean id="propertyName20KvpParser" class="org.geoserver.wfs.kvp.QNameNestedKvpParser">
    <constructor-arg value="propertyName"/>
    <constructor-arg ref="catalog"/>
    <property name="service" value="wfs"/>
  </bean>
  <bean id="storedQueryIdKvpParser" class="org.geoserver.wfs.kvp.URIKvpParser">
    <constructor-arg value="storedQueryId"/>
  </bean>
  <bean id="storedQuery_IdKvpParser" class="org.geoserver.wfs.kvp.URIKvpParser">
    <constructor-arg value="storedQuery_Id"/>
  </bean>
  <bean id="resolveKvpParser" class="org.geoserver.ows.kvp.EnumKvpParser">
    <constructor-arg value="resolve"/>
    <constructor-arg value="net.opengis.wfs20.ResolveValueType"/>
  </bean>
  <bean id="resolveTimeOutKvpParser" class="org.geoserver.ows.util.NumericKvpParser">
		<constructor-arg index="0" value="resolveTimeOut"/>
		<constructor-arg index="1" value="java.math.BigInteger"/>
  </bean>
	<bean id="sectionsKvpParser20" class="org.geoserver.wfs.kvp.v2_0.SectionsKvpParser"/>
	<bean id="sectionsKvpParser" class="org.geoserver.wfs.kvp.SectionsKvpParser"/>
    
	<!-- kvp request readers -->
	<bean id="wfsGetCapabilitiesKvpReader"  
        class="org.geoserver.wfs.kvp.GetCapabilitiesKvpRequestReader"/>

    <bean id="wfs20GetCapabilitiesKvpReader"  
        class="org.geoserver.wfs.kvp.v2_0.GetCapabilitiesKvpRequestReader"/>
        
  <bean id="describeFeatureTypeKvpReader" class="org.geoserver.wfs.kvp.DescribeFeatureTypeKvpRequestReader">
    <constructor-arg ref="catalog" />
  </bean>
  
  <bean id="describeFeature20TypeKvpReader" class="org.geoserver.wfs.kvp.v2_0.DescribeFeatureTypeKvpRequestReader">
    <constructor-arg ref="catalog" />
  </bean>

	<bean id="getFeatureKvpReader" class="org.geoserver.wfs.kvp.GetFeatureKvpRequestReader">
		<constructor-arg value="net.opengis.wfs.GetFeatureType"/>
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="filterFactory"/>
	</bean>
	<bean id="getFeature20KvpReader" class="org.geoserver.wfs.kvp.v2_0.GetFeatureKvpRequestReader">
        <constructor-arg value="net.opengis.wfs20.GetFeatureType"/>
        <constructor-arg ref="geoServer"/>
        <constructor-arg ref="filterFactory"/>
    </bean>
	<bean id="getFeatureWithLockKvpReader" class="org.geoserver.wfs.kvp.GetFeatureKvpRequestReader">
		<constructor-arg value="net.opengis.wfs.GetFeatureWithLockType"/>
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="filterFactory"/>
	</bean>
	<bean id="lockFeatureKvpReader" class="org.geoserver.wfs.kvp.LockFeatureKvpRequestReader">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="filterFactory"/>
	</bean>
	<bean id="lockFeatureKvp20Reader" class="org.geoserver.wfs.kvp.v2_0.LockFeatureKvpRequestReader">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="filterFactory"/>
	</bean>
	<bean id="transactionKvpReader" class="org.geoserver.wfs.kvp.WFSKvpRequestReader">
		<constructor-arg value="net.opengis.wfs.TransactionType"/>
	</bean>
	<bean id="releaseLockKvpReader" class="org.geoserver.wfs.kvp.ReleaseLockKvpRequestReader"/>
	
	<bean id="listStoredQueries20KvpReader" 
	   class="org.geoserver.wfs.kvp.v2_0.ListStoredQueriesKvpRequestReader"/>
	
	<bean id="describeStoredQueries20KvpReader" 
	   class="org.geoserver.wfs.kvp.v2_0.DescribeStoredQueriesKvpRequestReader"/>
	   
    <bean id="dropStoredQuery20KvpReader" 
       class="org.geoserver.wfs.kvp.v2_0.DropStoredQueryKvpRequestReader"/>
	
	<bean id="getPropertyValue20KvpReader" class="org.geoserver.wfs.kvp.v2_0.GetPropertyValueKvpRequestReader">
        <constructor-arg ref="geoServer"/>
        <constructor-arg ref="filterFactory"/>
    </bean>
    
	<!-- 1.0 xml readers -->
	<bean id="xmlReader-1.0.0" class="org.geoserver.wfs.xml.v1_0_0.WfsXmlReader" abstract="true">
		<constructor-arg index="1" ref="xmlConfiguration-1.0"/>
		<constructor-arg index="2" ref="geoServer"/>
	</bean>
	<bean id="wfsGetCapabilitiesXmlReader"
		class="org.geoserver.wfs.xml.v1_0_0.WfsXmlReader" parent="xmlReader-1.0.0">
		<constructor-arg value="GetCapabilities"/>
	</bean>
	<bean id="describeFetureTypeXmlReader"
		class="org.geoserver.wfs.xml.v1_0_0.WfsXmlReader" parent="xmlReader-1.0.0">
		<constructor-arg value="DescribeFeatureType"/>
	</bean>
	<bean id="getFeatureXmlReader" 
		class="org.geoserver.wfs.xml.v1_0_0.WfsXmlReader" parent="xmlReader-1.0.0">
		<constructor-arg value="GetFeature"/>
	</bean>
	<bean id="getFeatureWithLockXmlReader" 
		class="org.geoserver.wfs.xml.v1_0_0.WfsXmlReader" parent="xmlReader-1.0.0">
		<constructor-arg value="GetFeatureWithLock"/>
	</bean>
	<bean id="lockFeatureXmlReader" 
		class="org.geoserver.wfs.xml.v1_0_0.WfsXmlReader" parent="xmlReader-1.0.0">
		<constructor-arg value="LockFeature"/>
	</bean>
	<bean id="transactionXmlReader" 
		class="org.geoserver.wfs.xml.v1_0_0.WfsXmlReader" parent="xmlReader-1.0.0">
		<constructor-arg value="Transaction"/>
	</bean>
	
	<!-- 1.1 xml readers -->
	<bean id="xmlReader-1.1.0" class="org.geoserver.wfs.xml.v1_1_0.WfsXmlReader" abstract="true">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="xmlConfiguration-1.1"/>
	</bean>
	<bean id="wfsGetCapabilitiesXmlReader-1.1.0" parent="xmlReader-1.1.0">
		<constructor-arg type="java.lang.String" value="GetCapabilities"/>
	</bean>
	<bean id="describeFeatureTypeXmlReader-1.1.0" parent="xmlReader-1.1.0">
		<constructor-arg value="DescribeFeatureType"/>
	</bean>
	<bean id="getFeatureTypeXmlReader-1.1.0" parent="xmlReader-1.1.0">
		<constructor-arg value="GetFeature"/>
	</bean>
	<bean id="getFeatureWithLockXmlReader-1.1.0" parent="xmlReader-1.1.0">
		<constructor-arg value="GetFeatureWithLock"/>
	</bean>
	<bean id="lockFeatureXmlReader-1.1.0" parent="xmlReader-1.1.0">
		<constructor-arg value="LockFeature"/>
	</bean>
	<bean id="transactionXmlReader-1.1.0" parent="xmlReader-1.1.0">
		<constructor-arg value="Transaction"/>
	</bean>
	<bean id="getGmlObjectXmlReader-1.1.0" parent="xmlReader-1.1.0">
	    <constructor-arg value="GetGmlObject"/>
	</bean>
	
	<!-- 2.0 xml readers -->
	<bean id="xmlReader-2.0" class="org.geoserver.wfs.xml.v2_0.WfsXmlReader" abstract="true">
        <constructor-arg ref="geoServer"/>
    </bean>
    <bean id="wfsGetCapabilitiesXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg type="java.lang.String" value="GetCapabilities"/>
    </bean>
    <bean id="describeFeatureTypeXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="DescribeFeatureType"/>
    </bean>
    <bean id="getFeatureXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="GetFeature"/>
    </bean>
    <bean id="getFeatureWithLockXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="GetFeatureWithLock"/>
    </bean>
    <bean id="lockFeatureXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="LockFeature"/>
    </bean>
    <bean id="transactionXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="Transaction"/>
    </bean>
    <bean id="listStoredQueriesXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="ListStoredQueries"/>
    </bean>
    <bean id="describeStoredQueriesXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="DescribeStoredQueries"/>
    </bean>
    <bean id="createStoredQueryXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="CreateStoredQuery"/>
    </bean>
    <bean id="dropStoredQueryXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="DropStoredQuery"/>
    </bean>
    <bean id="getPropertyValueXmlReader-2.0" parent="xmlReader-2.0">
        <constructor-arg value="GetPropertyValue"/>
    </bean>
    
	<!-- default feature type encoders -->
	<bean id="gml2FeatureTypeEncoder" 
		class="org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder$V10">
		<constructor-arg ref="geoServer"/>
	</bean>
	<bean id="gml3FeatureTypeEncoder" 
		class="org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder$V11">
		<constructor-arg ref="geoServer"/>
	</bean>
	<bean id="gml32FeatureTypeEncoder" 
        class="org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder$V20">
        <constructor-arg ref="geoServer"/>
    </bean>
	<!-- default get feature producers -->
	<bean id="gml2OutputFormat" 
		class="org.geoserver.wfs.xml.GML2OutputFormat" scope="prototype">
		<constructor-arg ref="geoServer"/>
	</bean>
	<!-- uncomment below and comment out above to switch between gml2 output formats -->
	<!--bean id="gml2OutputFormat" 
        class="org.geoserver.wfs.xml.GML2OutputFormat2" scope=prototype">
        <constructor-arg ref="geoServer"/>
    </bean-->
	<bean id="gml3OutputFormat" class="org.geoserver.wfs.xml.GML3OutputFormat"> 
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="xmlConfiguration-1.1"/>
	</bean>
	<bean id="gml32OutputFormat" class="org.geoserver.wfs.xml.GML32OutputFormat"> 
        <constructor-arg ref="geoServer"/>
        <constructor-arg ref="xmlConfiguration-1.1"/>
    </bean>
    
	<bean id="hitsOutputFormat" class="org.geoserver.wfs.response.HitsOutputFormat">
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="xmlConfiguration-1.1"/>
	</bean>
	<bean id="shapezipOutputFormat" class="org.geoserver.wfs.response.ShapeZipOutputFormat" >
		<constructor-arg ref="geoServer"/>
		<constructor-arg ref="catalog"/>
		<constructor-arg ref="resourceLoader"/>
	</bean>

    <bean id="CSVOutputFormat" class="org.geoserver.wfs.response.CSVOutputFormat">
        <constructor-arg index="0" ref="geoServer"/>
    </bean>
    
    <bean id="hits20OutputFormat" class="org.geoserver.wfs.response.v2_0.HitsOutputFormat">
        <constructor-arg ref="geoServer"/>
    </bean>

	<!-- GetFeature JSONP -->
	<bean id="geoJSONPGetFeatureResponse" class="org.geoserver.wfs.json.GeoJSONGetFeatureResponse">
		<constructor-arg ref="geoServer" />
		<constructor-arg value="text/javascript" />
	</bean>
	<bean id="geoJSONPGetFeatureResponseEF" class="org.geoserver.wfs.json.JSONPExtensionFilter">
		<constructor-arg value="geoJSONPGetFeatureResponse" />
	</bean>
	<!-- GetFeature JSON -->
	<bean id="geoJSONGetFeatureResponse" class="org.geoserver.wfs.json.GeoJSONGetFeatureResponse">
		<constructor-arg ref="geoServer" />
		<constructor-arg value="application/json" />
	</bean>
	<bean id="geoSimpleJSONGetFeatureResponse" class="org.geoserver.wfs.json.GeoJSONGetFeatureResponse">
		<constructor-arg ref="geoServer" />
		<constructor-arg value="json" />
	</bean>

	<!-- DescribeFeatureType JSONP -->
	<bean id="jsonPDescribeFeatureTypeResponse" class="org.geoserver.wfs.json.JSONDescribeFeatureTypeResponse">
		<constructor-arg ref="geoServer" />
		<constructor-arg value="text/javascript" />
	</bean>
	<bean id="jsonPDescribeFeatureTypeResponseEF" class="org.geoserver.wfs.json.JSONPExtensionFilter">
		<constructor-arg value="jsonPDescribeFeatureTypeResponse" />
	</bean>
	<!-- DescribeFeatureType JSON -->
	<bean id="jsonDescribeFeatureTypeResponse" class="org.geoserver.wfs.json.JSONDescribeFeatureTypeResponse">
		<constructor-arg ref="geoServer" />
		<constructor-arg value="application/json" />
	</bean>
    
    <!-- workspace qualifier -->
    <bean id="wfsWorkspaceQualifier" class="org.geoserver.wfs.WFSWorkspaceQualifier">
        <constructor-arg ref="catalog"/>
    </bean>
    <bean id="wfsLocalWorkspaceURLManger" class="org.geoserver.ows.LocalWorkspaceURLMangler">
      <constructor-arg value="wfs"/>
    </bean>
    
    <!-- inject the static method with the KVP parser -->
    <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
        <property name="staticMethod" value="org.geoserver.wfs.xml.SqlViewParamsExtractor.setWfsSqlViewKvpParser"/>
        <property name="arguments">
            <list>
                <ref bean="wfsSqlViewKvpParser"/>
            </list>
       </property>
    </bean>
    
    <!-- XStream persister initializer -->
    <bean id="wfsXStreamPersisterInitializer" class="org.geoserver.wfs.WFSXStreamPersisterInitializer" />

  	<!-- dispatcher callback that will enforce configured MIME type for WFS GML responses -->
	<bean id="wfsGMLMimeTypeEnforcer" class="org.geoserver.wfs.WFSGMLMimeTypeEnforcer">
		<constructor-arg ref="geoServer"/>
	</bean>

	<!-- dispatcher callback that will enforce configured Output Formats for WFS responses -->
	<bean id="wfsOutputFormatCallback" class="org.geoserver.wfs.outputformat.WFSOutputFormatCallback">
		<constructor-arg ref="geoServer"/>
	</bean>
	
	<!-- Resource voter -->
	<bean id="wfsResourceVoter" class="org.geoserver.wfs.WFSResourceVoter"/>

	<bean id="wfsDefaultLocaleCallback" class="org.geoserver.wfs.WFSDefaultLocaleCallback">
		<constructor-arg ref="geoServer"/>
	</bean>
</beans>
